import React from 'react';
import styles from './index.less';

export default function DetailItem({ label, labelWidth = 80, children, ...rest }) {
    return (
        <div className={styles.wrapper} {...rest}>
            {label && (
                <span className={styles.label} style={{ width: labelWidth }}>
                    {label}：
                </span>
            )}
            <span className={styles.value}>{children}</span>
        </div>
    );
}
